home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
jpeg
/
jpgidx13
/
jpgindex
/
english
/
jpgindex.doc
Wrap
Text File
|
1993-05-24
|
15KB
|
320 lines
-----------------------------------------------------------------------------
J P G I N D E X 1 . 3 e
_____________________________
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
Copyright (c) 1993 by TBH-Softworx --- all rights reserved
Oliver Fromme, Klingestr. 2, 38640 Goslar, Germany
Internet email: inof@asterix.rz.tu-clausthal.de
For private persons, this program is CARDWARE. You may copy it, use it,
and give it to your friends under the following conditions:
* Don't charge any money.
* Keep all the files together.
* Don't change the files in any way.
* If you use this program or if you think that it's useful (or both...?),
please write a postcard (e. g. with a beautiful picture of your home
town), see my address above. You needn't send money. But if you really
want to give me some money, please do so...
If you're using this program for images on a BBS, Mailbox, ftp-server,
fsp-server, any kind of public software/image library/archive or something
similar, YOU HAVE TO REGISTER JPGINDEX. Just send US$ 20 or DM 20 (cash, no
other currencies, no stamps) to my address (see above). I'll imform you if
there's a newer version of JPGIndex.
The JPGIndex software package contains the following files:
1. README.TXT - might contain important news and updates
2. JPGINDEX.EXE - the main program JPGIndex
3. TGASCALE.EXE - a tool to scale targa images
4. TGAMERGE.EXE - a tool to merge targa images together
5. TGAWRITE.EXE - a tool to write into targa images
6. *.DOC - english documentation
7. *.DOK - german documentation
ATTENTION:
Use this software on your own risk!
I'm not responsible for any damage caused by the use of this software!
I've tested it intensively, and it seems to work.
Nevertheless, be careful.
JPGIndex needs the programs DJPEG and CJPEG from "The Independent JPEG Group"
(IJG), written by Thomas Lane. They're available from major PD sources.
-----------------------------------------------------------------------------
What is JPGIndex?
~~~~~~~~~~~~~~~~~
JPGIndex takes some JPEG images (as many as you like), scales them down
(i.e. shrinks them), and merges them together. The resulting image is
called "index image". The input images are called "stamps".
* Input: Any number of Images (stamps), JPEG format (JFIF standard).
Greyscale or true colour images. All stamps are equally scaled
(by the same factor).
* Output: An index image, targa or JPGE format. Greyscale or true colour
(can be set by the user). The size of the image and the Space
between the stamps can be set by the user. The filenames are
written below the stamps. The stamps are sorted by filename
(optional). A preview of the index image can be displayed
(optional, VGA needed).
JPGIndex is especially useful if you have lots of JPEG images. It's a good
idea to make an index image for every subdirectory.
System requirements:
* AT, 80286 (there are special 386 versions of DJPEG/CJPEG)
* a harddisk
* sufficient memory for DJPEG/CJPEG (see IJG documentation)
* If possible, a large RAM disk (approx. 1 - 3 Mb).
You should set the environment variable TEMP or TMP in order
to use the RAM disk.
-----------------------------------------------------------------------------
Getting started
~~~~~~~~~~~~~~~
The simplest possible usage is the following:
JPGINDEX .
(Don't forget the ".", it means the current directory.)
Then JPGIndex will search for all JPEG files in the current directory and
read their sizes and colour attributes (greyscale [8 bit] or true colour
[24 bit]). Their names are sorted alphabetically and displayed on the screen.
Note: JPGIndex searches for files with an extension of ".JPG".
If you've got JPEG files with other extensions (e.g. ".JPE" or ".J"),
you have to specify them, for example
JPGINDEX *.JPE *.J
to search for all files with an extension of ".JPE" and ".J".
Now JPGIndex tries different scaling factors, until it has found one which
fits best for a 800x600 pixel image. This complicated process may take
several seconds.
If you've got a VGA graphics adapter, JPGIndex now display a preview of
what it has computed. Press any key to return to textmode.
Then JPGIndex produces four files:
* INDEX.BAT - A batch file. It will do the complete conversion,
scaling and everything else.
* INDEX.MRG - Contains the position data of the stamps (where they're
located in the index image). This file is used by
INDEX.BAT and should not be edited by the user.
* INDEX.WRT - Contains the position data of the filenames which are
written below the stamps. This file is used by INDEX.BAT
and should not be edited by the user.
* CLEANUP.BAT - If you're happy with your index image produced by
INDEX.BAT, you may call this batch file. It will delete
all temporary files (including CLEANUP.BAT itself).
Just type "INDEX" now to start the batch job.
Note: The programs DJPEG.EXE, CJPEG.EXE, TGASCALE.EXE, TGAMERGE.EXE, and
TGAWRITE.EXE must be located somewhere in the path (check your PATH
environment variable by typing "PATH"). Otherwise INDEX.BAT can't
find them, which results in an error message. If this is the case,
You have to look where those programs are, add the directory to your
PATH environment variable, and call INDEX.BAT again.
If INDEX.BAT terminates succesfully (without an error message), there are
two more files: INDEX.TGA and INDEX.JPG. The JPEG image is compressed using
a quality value of 75. If you don't like the quality setting, just use
CJPEG to compress INDEX.TGA again with better quality (see the documentation
from IJG).
If you think that IMAGE.JPG looks ok, you may call CLEANUP.BAT. It will
delete all temporary files, including all remaining targa files and
CLEANUP.BAT itself.
Once again, step by step:
1. Run JPGIndex. You can specify any number of images and directories on
the command line.
2. Check the preview. If you don't like it, call JPGIndex with different
options (see below).
3. Run INDEX.BAT.
4. Check INDEX.JPG. If you don't like the quality (or the file size),
compress it with a different quality setting.
5. Run CLEANUP.BAT.
6. Be happy.
-----------------------------------------------------------------------------
Options of JPGIndex
~~~~~~~~~~~~~~~~~~~
This is the complete sytax:
JPGINDEX files/directories ... [options ...]
Files, directories, and options may appear in any order. If no file extension
is given, ".JPG" is assumed.
Version 1.3e supports the following options (not case sensitive):
/Wx Sets the width of the index image, by default 800 pixel (/W800),
maximum 2048 pixel. There's no space between /W and x.
If necessary, JPGIndex reduces the width slightly to improve
the arrangement of the stamps.
/Hx Sets the height of the index image, by default 600 pixel (/W600),
maximum 2048 pixel. There's no space between /H and x.
If necessary, JPGIndex reduces the height slightly to improve
the arrangement of the stamps.
/Sx Sets the space between stamps (vertical and horizontal), by default
8 pixel (/S8).
/Tx Sets the space between the stamp and its filename, by default 2
pixel (/T2).
/G Forces JPGIndex to produce a greyscale index image. This saves time
(both when producing the index image, and later when decompressing
and displaying the index image) and hard disk space.
If all stamps are greyscale images, JPGIndex will automatically
produce a greyscale index image. If there's at least one true colour
stamp, the index will be true colour also (if you don't use this
option).
Be careful: some JPEG images are signed as "true colour", but they
contain only shades of grey, wasting time and space.
You'd better convert them to real greyscale images.
/C Forces JPGIndex to produce a true colour image, even when all stamps
are greyscale images. This doesn't make sense, I think.
/D- Do not display the Preview. This is useful if you already know what
it will look like.
/N+ Sort the images by filenames. This is also done by default, so you
don't need this option.
/N- Don't sort the images by filenames.
/N* Sort the images in order to optimize the index image. This usually
produces less "holes" in the index image and a better scaling
factor.
/A+ Shift stamps vertically to fill holes in the index image, usually
resulting in a more compact index image. This is done by default if
/N* is specified. Looks sometimes weird in conjunction with /N- or
/N+ (ragged bottom border).
/A- Don't shift stamps vertically (by default if /N* is not specified).
-----------------------------------------------------------------------------
Important notes
~~~~~~~~~~~~~~~
* As mentioned above, the programs DJPEG.EXE, CJPEG.EXE, TGASCALE.EXE,
TGAMERGE.EXE, and TGAWRITE.EXE must be located somewhere in the path
in order to be found by INDEX.BAT.
* You'd better not edit INDEX.BAT, INDEX.MRG, or INDEX.WRT manually.
If you are curious, look at them. But be warned, any modification may
lead to unpredictable results.
* INDEX.BAT must be run in the directory it was produced in by JPGIndex.
This must also be the current directory. This is a small bug of DJPEG
and CJPEG (version 4), which refuse to work if the converting files
are not in the current directory.
* JPGIndex gives a rough approximation of the disk space needed for
temporary files. There should be enough space on the current drive.
* If your RAM disk is big enough, you should set the environment variable
TEMP or TMP in order to use the RAM disk. INDEX.BAT will produce the
targa image there. If your RAM disk is not big enough, let TEMP/TMP
point to your hard disk.
For example, if you're making an greyscale index image of 800x600 pixel,
it will need about 480 Kb (800 multiplied by 600) for the targa image.
If it's true colour, it needs three times the space (about 1.5 Mb).
* If an error occurs while INDEX.BAT is running (e.g. not enough XMS memory
for DJPEG, or no space left on the hard disk), a message is displayed and
INDEX.BAT stops. You may then try to fix the error (free some XMS memory
or delete some files) and Run INDEX.BAT again. It will continue with
the picture which produced the error.
* You may also interrupt INDEX.BAT by pressing Ctrl-C or Ctrl-Break.
To continue, just run INDEX.BAT again. If you want to start from
the beginning, delete all files with an extension of "*.TGS".
-----------------------------------------------------------------------------
How it all works
~~~~~~~~~~~~~~~~
(You needn't read this.)
This section describes how the index image is produced by INDEX.BAT.
For every stamp <name> the following operations are performed:
* If there's already a file named <name>.TGS, this stamp is skipped.
* DJPEG is run: it produces <name>.TGA.
* TGASCALE is run: it reads <name>.TGA and produces <name>.TGS.
* The file <name>.TGA is deleted.
When all stamps have their corresponding .TGS-file, the following is done:
* TGAMERGE is run with INDEX.MRG as parameter.
It reads all .TGS-files and produces INDEX.TGA (using the directory
specified by the environment variable TMP or TEMP, if set).
* All .TGS-files are deleted.
* TGAWRITE is run with INDEX.WRT as parameter.
It writes the filenames into the index image INDEX.TGA.
* If INDEX.TGA was produce in a different directory, it is now moved to
the current directory (i.e. copied and then deleted from the original
directory).
* CJPEG is run. It reads INDEX.TGA and produces INDEX.JPG. A quality setting
of 75 is used, which is sufficient in most cases.
-----------------------------------------------------------------------------
The End
~~~~~~~
This is probably not the last version of JPGIndex. There are many features
I can implement or improve.
By the way, there are more targa utilities I have written. They're not
included in this software package because JPGIndex doesn't need them.
* TGACLIP - cuts a part from a targa image.
* TGACOLOR - converts true colour images to greyscale images
and vice versa.
* TGACONTR - enables you to chnage contrast, brightness, and colouring
of a targa images. Very powerful.
* TGAMIRR - converts images with bottom-up raster to top-down raster.
Is also able to mirror an image. For example, "Image Alchemy"
produces bottom-up targa images.
* TGAVIEW - displays targa images on most VGA and SuperVGA graphics
adapters (greyscale oder true colour using dithering
techniques). You can move around with your mouse, display
coordinates and "pick colours".
How to get the latest version of JPGIndex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* If you can access "anonymous ftp", you can get it from the ftp-server
"ftp.tu-clausthal.de" (139.174.2.10), it is in the directory
/pub/msdos/graphics.
* If you can receive email, I can email it to you (uuencoded).
* I can send it to you via snailmail. Please note that this costs US$ 10 or
DM 10 (cash, no other currencies, no stamps) to cover my expenses. Don't
forget to mention the disk format you need. And make sure that there's a
newer version, otherwise you may get the same version you already have.
* Please no calls. Mail or email only.
I have to mention that...
~~~~~~~~~~~~~~~~~~~~~~~~~
* "The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated."
Have fun!
- Olli -
-----------------------------------------------------------------------------
Oliver Fromme, Klingestr. 2, 38640 Goslar, Germany
Internet email: inof@asterix.rz.tu-clausthal.de
-----------------------------------------------------------------------------
THIS ROOM IS AIR CONDITIONED -- KEEP WINDOWS CLOSED!